package com.hmy.finance.dal.po.receipt;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hmy.finance.api.common.enums.receipt.AccountStatusEnum;
import lombok.Data;
import org.apache.ibatis.type.EnumTypeHandler;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 客户余额账户
 *
 * @TableName customer_balance_account
 */
@TableName(value = "customer_balance_account")
@Data
public class CustomerBalanceAccountPo implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "customer_id")
    private Long customerId;

    /**
     * 客户名称
     */
    @TableField(value = "customer_name")
    private String customerName;

    /**
     * 余额
     */
    @TableField(value = "balance_amount")
    private BigDecimal balanceAmount;

    /**
     * 总入账金额
     */
    @TableField(value = "total_income_amount")
    private BigDecimal totalIncomeAmount;

    /**
     * 总支出金额
     */
    @TableField(value = "total_expenses_amount")
    private BigDecimal totalExpensesAmount;

    /**
     * 账户状态
     */
    @TableField(value = "account_status", typeHandler = EnumTypeHandler.class)
    private AccountStatusEnum accountStatus;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人姓名
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 更新人ID
     */
    @TableField(value = "updater_id")
    private Long updaterId;

    /**
     * 更新人姓名
     */
    @TableField(value = "updater_name")
    private String updaterName;

    /**
     * 是否删除，0-否；1-是
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}